package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Member;
import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Param;
import com.itheima.pojo.OrderSettingList;

import java.util.List;
import java.util.Map;

public interface OrderDao {

    public void add(Order order);

    public List<Order> findByCondition(Order order);

    public Map findById4Detail(Integer id);

    public Integer findOrderCountByDate(String date);

    public Integer findOrderCountAfterDate(String date);

    public Integer findVisitsCountByDate(String date);

    public Integer findVisitsCountAfterDate(String date);

    public List<Map> findHotSetmeal();

    Integer[] findByDate(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("memberId") Integer memberId);

    Integer[] queryMyAllOrder(@Param("memberId") Integer memberId);

    Page<OrderSettingList> selectByCondition(QueryPageBean queryPageBean);

    OrderSettingList findByOSL(OrderSettingList orderSettingList);

    OrderSettingList findOrderListById(Integer id);

    Integer findSetmealIdByOrderId(Integer id);

    Member findMemberByOrderId(Integer id);

    void edit(Order order);

    void deleteOrder(Integer id);

    void editStatusByorderId(Map map);

    //查询时间段内有预约的日期
    public List<String> ordertDateIime(Map<String, String> map);

    //根据时间获取预约人数
    public Integer selectOrderNumber(String date);

    //根据时间获取已到诊人数
    public Integer selectOrderStatusNumber(String date);

    String findDateById(Integer id);
}
